package net.thermetics.fx.services;

/**
 * Provides business methods for loading dynamic resources, such as
 * non-caching JavaScript 
 * @author projectmoon
 *
 */
public interface DynamicResourceService {
	/**
	 * Returns a String containing the code of the requested JavaScript file.
	 * These scripts are limited to specific namespaces within the application.
	 * @param widget The widget/page/organizational unit this script belongs to.
	 * @param name The filename of the JavaScript.
	 * @return The code of the script, if it was found. null otherwise.
	 */
	public String getScript(String widget, String name);
	
	/**
	 * Gets a stylesheet.
	 * @param widget
	 * @param sheetName
	 * @return The code of the stylesheet if found, null otherwise.
	 */
	public String getStylesheet(String widget, String sheetName);
}
